package main

import (
	"fmt"
	"vueadmin/es"
)

var index = "member"

func main() {
	query := map[string]interface{}{
		"query": map[string]interface{}{
			"match": map[string]interface{}{
				"username": "赵莎莎",
			},
		},
	}
	res, err := es.New().Index(index).Query(query).Limit(20).Page(1).Order("age:desc").Find()
	if err != nil {
		fmt.Println(err)
	}
	fmt.Println(res)
}
